package com.boot;

import com.boot.config.UpConfig;
import com.boot.domain.Car2;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author
 * @date 2025-07-28
 * @Description 测试  获取配置信息
 */
public class MainApplication {
    public static void main(String[] args) {
        // 启动springboot 项目 必须指定一个配置 不一定就是当前类
        ConfigurableApplicationContext applicationContext = SpringApplication.run(UpConfig.class, args);
        //car2-com.boot.domain.Car2
        Car2 car2 = (Car2) applicationContext.getBean("car2-com.boot.domain.Car2");
        System.out.println(car2);
    }
}
